package com.lfy.modules.safety.limit;
/**
 * redis限流
 *
 * @author <a href="https://www.lvfeiy.top">lvfeiyang</a>
 * @date 2024/4/24 21:48
 */
public class LimitRedis extends BaseLimit{

//    private RedisTemplate redisTemplate;
    @Override
    protected Integer getCount(String key, long time) {
//        ZSetOperations zSetOperations = redisTemplate.opsForZSet();
//        long nowTime = System.currentTimeMillis();
//        zSetOperations.removeRangeByScore(key,0,nowTime-period*1000);
//        Long count = zSetOperations.zCard(key);
        return null;
    }

    @Override
    public void setCount(String key) {
        //        long nowTime = System.currentTimeMillis();
//        zSetOperations.add(key,nowTime,nowTime);
    }
}
